package com.app.mymvp.business.search;

import android.content.Context;

import com.app.mymvp.base.BaseModel;
import com.app.mymvp.base.BasePresenter;
import com.app.mymvp.base.BaseView;
import com.app.mymvp.entity.SearchHistoryEntity;
import com.app.mymvp.entity.UserInfoEntity;

import java.util.List;

/**
 * Created by ${Bi} on 2016/10/13 11:12.
 */

public interface SearchContract {
    interface Model extends BaseModel {
        boolean hasData(String tempName);
        void deleteData();
        void deleteOneData(String historyName);
        List<SearchHistoryEntity> queryData(String tempName);
        void insertData(String tempName);
        void initDatebase(Context context);
    }

    interface View extends BaseView {
        void toActivity(String key);

        void showResult(List<SearchHistoryEntity> list);
    }
    abstract class Presenter extends BasePresenter<View, Model> {
        abstract void initDatebase(Context context);
        abstract void search(String string);
        abstract void deleteData();
        abstract void deleteOneData(String historyName);
        abstract void insertData(String tempName);
        abstract boolean hasData(String tempName);

    }

}
